package com.castle.fortress.admin.oa.entity;

import java.math.BigDecimal;

import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;

import java.util.Date;

import lombok.Data;
import com.baomidou.mybatisplus.annotation.*;
import org.beetl.sql.core.annotatoin.Table;

import java.io.Serializable;

/**
 * 用户假期余额 实体类
 *
 * @author whc
 * @since 2022-11-03
 */
@Data
@TableName("oa_user_holiday_setting")
public class UserHolidaySettingEntity implements Serializable {
    private static final long serialVersionUID = 1L;
    /**
     * ID
     */
    @JsonSerialize(using = ToStringSerializer.class)
    @TableId(
            value = "id",
            type = IdType.ASSIGN_ID
    )
    private Long id;
    /**
     * 对应用户
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private Long userId;
    /**
     * 对应的假期类型
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private Long holidayTypeId;
    /**
     * 总计时长(天/小时)
     */
    private BigDecimal totalAmount;
    /**
     * 剩余时长(天/小时)
     */
    private BigDecimal surplusAmount;
    /**
     * 状态
     */
    private Integer status;
    /**
     * 创建人
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private Long createUser;
    /**
     * 创建时间
     */
    private Date createTime;
    /**
     * 更新人
     */
    @JsonSerialize(using = ToStringSerializer.class)
    private Long updateUser;
    /**
     * 更新时间
     */
    private Date updateTime;


    @TableField(exist = false)
    private String username;

    @TableField(exist = false)
    private HolidayTypeEntity holidayTypeEntity;


}
